package xhwl.hmo.mall.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.hmo.mall.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by Administrator on 2017/9/7.
 */

public class HMONewsUrlApi extends BaseApi {
   HmoNewsReq req;


    public HMONewsUrlApi(String client_type) {
        req = new HmoNewsReq(client_type);
    }


    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).HmoNewsUrl(requestBody);
    }

    private class HmoNewsReq {
        public String client_type;
        public HmoNewsReq(String client_type) {
            super();
            this.client_type = client_type;
        }
    }
}
